<template>
  <div class="wallet_div">
    <!-- 头部 -->
    <my-header  :left="true" title="我的钱包">
      <template #right_icon>
        <span class="help">帮助</span>
      </template>
    </my-header>
    <!-- 资产展示部分 -->
    <div class="user_price">
      <p class="title">钱包总余额(元)</p>
      <p class="price">¥{{user_price}}</p>
    </div>
    <!-- 其他 -->
    <div class="other_div">
      <span>银行卡</span>
      <span>券包</span>
      <span>收支明细</span>
    </div>
  </div>
</template>
<script>
import MyHeader from "../common/Header";
export default {
  name:"Wallet",
  components: {
    MyHeader,
  },
  data() {
    return {
      user_price:0,
    }
  },
  created() {
    this.get_user_price();
  },
  methods:{
    // 获取用户余额
    async get_user_price(){
      const {data:res} = await this.$http.get("get_user_price");
      console.log(res);
      this.user_price = res.data.Balance
    }
  }
}
</script>
<style lang="less" scoped>
.wallet_div{
  padding-top: 0.45rem;
  /deep/.header{
    background-color: #333333;
    color: #FFF;
  }
  /deep/.icon-fanhui{
    color: #FFF;
  }
}
.help{
  font-size: 0.15rem;
  color: #FFF;
}
.user_price{
  background-color: #333;
  color: #FFF;
  padding: 0.3rem 0rem;
  text-align: center;
  font-size: 0.2rem;
  border-radius: 0rem 0rem 0.3rem 0.3rem;
  .title{
    font-size: 0.14rem;
    color: #888888;
  }
  .price{
    margin-top: 0.05rem;
    font-size: 0.45rem;
  }
}
.other_div{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 0.12rem;
  background-color: #FFF;
  margin: 0.1rem;
  border-radius: 0.1rem;
  padding: 0.1rem 0.2rem;
  box-sizing: border-box;
}
</style>